package com.exam.dto;

import com.exam.entity.User;
import lombok.Builder;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
@Builder
public class AddUserDto {

    private String username;

    private  String password;

    private  Integer roleId;

    private  String trueName;

    public User toUser(){
        User user=new User();
        BeanUtils.copyProperties(this,user);
        return user;
    }
}
